/*--  LindeDaxOffice18; font wide x height = 7x8   --*/
/*--  pixel wide x height = 7x8  --*/
font_t char_lowerer_Size7[26][7] = 
{
	{0x00,0x04,0x2A,0x2A,0x1C,0x02,0x00,},			//a
	{0x00,0xFE,0x12,0x12,0x12,0x0C,0x00,},			//b			
	{0x00,0x1C,0x22,0x22,0x22,0x00,0x00,},			//c
	{0x00,0x0C,0x12,0x12,0x12,0xFE,0x00,},			//d
	{0x00,0x1C,0x2A,0x2A,0x2A,0x1A,0x00,},			//e
	{0x00,0x00,0x10,0x7E,0x50,0x00,0x00,},			//f
	{0x00,0x39,0x45,0x45,0x45,0x7E,0x00,},			//g
	{0x00,0x7E,0x10,0x10,0x0E,0x00,0x00,},			//h
	{0x00,0x00,0x00,0x5E,0x00,0x00,0x00,},			//i
	{0x00,0x00,0x01,0x5E,0x00,0x00,0x00,},			//j
	{0x00,0x7E,0x08,0x14,0x22,0x00,0x00,},			//k
	{0x00,0x00,0x00,0x7E,0x00,0x00,0x00,},			//l
	{0x00,0x1E,0x10,0x0E,0x10,0x0E,0x00,},			//m
	{0x00,0x1E,0x10,0x10,0x0E,0x00,0x00,},			//n
	{0x00,0x1C,0x22,0x22,0x22,0x1C,0x00,},			//o
	{0x00,0x7F,0x28,0x48,0x48,0x30,0x00,},			//p
	{0x00,0x30,0x48,0x48,0x48,0x7F,0x00,},			//q
	{0x00,0x00,0x1E,0x08,0x10,0x00,0x00,},			//r
	{0x00,0x00,0x12,0x2A,0x24,0x00,0x00,},			//s
	{0x00,0x00,0x10,0x3E,0x12,0x00,0x00,},			//t
	{0x00,0x1C,0x02,0x02,0x1E,0x00,0x00,},			//u
	{0x00,0x10,0x0C,0x02,0x0C,0x10,0x00,},			//v
	{0x18,0x06,0x0C,0x10,0x0C,0x06,0x18,},			//w
	{0x00,0x22,0x14,0x08,0x14,0x22,0x00,},			//x
	{0x00,0x41,0x39,0x0E,0x30,0x40,0x00,},			//y
	{0x00,0x12,0x16,0x1A,0x12,0x00,0x00,},			//z
};

void lcd_draw_lowerchar( S16 start_row, S16 start_column, font_size size, char character, U8 is_hide)
{
	unsigned char j;
	if(size == SIZE_7)	//SIZE_7, It's vertial page is 0
	{
		for(j = 0; j < 7; j++)
		{
			if(is_hide == HIDE_ENABLE)
			{
				OLED_GRAM[start_row][j + start_column] = 0x00;
			}
			else
			{
				OLED_GRAM[start_row][j + start_column] = char_upperer_Size7[character - 97][j];
			}			
		}		
	}	
}

void put_string(S16 start_row, S16 start_column, font_size size, char *string, U8 is_hide)
{
	char character;
	char number;
	if(is_hide == HIDE_DISABLE)
	{
		do
		{
			character = *string;
			if((character >= 65) && (character <= 90))
			{
				lcd_draw_upperchar(start_row, start_column, SIZE_7, character, HIDE_DISABLE);
				
			}
			else if((character >= 48) && (character <= 57))
			{
				number = character - 48;
				lcd_draw_number(start_row, start_column - 2, SIZE_7, number, HIDE_DISABLE);
			}
			if((character >= 97) && (character <= 122))
			{
				lcd_draw_lowerchar(start_row, start_column, SIZE_7, character, HIDE_DISABLE);
				
			}
			else
			{
				switch (character)
				{
					case '%': lcd_draw_sign( start_row, start_column, SIZE_7, 0); break;	//Display '%'
					case '/': lcd_draw_sign( start_row, start_column, SIZE_7, 1); break;	//Display '/'
					case ':': lcd_draw_sign( start_row, start_column, SIZE_7, 2); break;	//Display ':'
					case '!': lcd_draw_sign( start_row, start_column, SIZE_7, 3); break;	//Display '!'
					case '+': lcd_draw_sign( start_row, start_column, SIZE_7, 4); break;	//Display '+'
					case '-': lcd_draw_sign( start_row, start_column, SIZE_7, 5); break;	//Display '-'
					case ';': lcd_draw_sign( start_row, start_column, SIZE_7, 6); break;	//Display ';'
					case '.': lcd_draw_sign( start_row, start_column, SIZE_7, 7); break;	//Display '.'
					case ' ': lcd_draw_sign( start_row, start_column, SIZE_7, 8); break;	//Display ' '
					default: break;
				}
			}			
			// To adjust the distence between to near characters
			if((character == 'M') ||(character == 'W') || (character == '%')|| (character == 'A'))
			{
				start_column += 8;
			}
			else if(character == ' ')
			{
				start_column += 6;
			}
			else
			{
				start_column += 7;
			}
			string ++;
		}
		while(character != '\0');
	}
}